#ifndef MYGAME_H
#define MYGAME_H

#include "MyDefinitions.h"

class MyEngine;
class MyPlayer;
class MyScenery;
class MyInfobar;
class MyEnemies;
class MyShots;
class MyMessages;
class MyPlayerActionManager;
class MySplashScreen;

 
/*! 
 *  \class MyGame
 *  \brief This class is active most of the time during play, serving as a parent for other game objects (of classes MyPlayer, MyScenery, MyPlayerActionManager, MyInfobar, MyEnemies, MyShots, MyMessages and MySplashScreen). 
 *  \author Peter Kosa
 *  \version 1.52
 *  \date    2006-2008
 */
class MyGame{
	public:
		MyGame(MyEngine* _parent);
		~MyGame();
		
		gameState actGameState;

    /*! pointer to parent engine */
		MyEngine* parent;					
		/*! object with player data */
		MyPlayer* actPlayer;				
		/*! background and sky drawing */ 
		MyScenery* actScenery;				
		/*! MyPlayerActionManager */
		MyPlayerActionManager* actPlayerActionManager; 
		/*! information about player status */
		MyInfobar* actInfobar;				
		/*! MyEnemies */
		MyEnemies* actEnemies;
		/*! MyShots */
		MyShots* actProjectils;
		/*! MyMessages */
		MyMessages* actMessages;			
		/*! MySplashScreen - village shopping menu */
		MySplashScreen* actSplashScreen;    
		
		//game colors
		SDL_Color *color_bar1, *color_bar2, *color_life1, *color_life2,
			*color_mana1, *color_mana2, *color_exp1, *color_black, *color_white,
			*color_wood1, *color_wood2, *color_red ;

    /*! send sign to engine - quit due to error in init */
		void demand_quit(); 
		/*! clear all resources used by this class */
		void clean_game();					
		/*! init all objects */
		void init_game();					
		/*! init game colors */
		void init_colors();			
		/*! resets evetrything to default state */
		void reset_game();					
		/*! move and draw all game objects */				
		void draw_all(int _t);				
		/*! process sdl event - possibly pass to other objects for processing */
		void process_event(SDL_Event& event, int);
		/*! death of the plater */
		void process_player_death();
		/*! this method is triggered by player getting a new level - for adjusting enemy spawn level and displaying apropriate msg */
		void level_up_trigger();			
};
#endif
